package com.aspose.cells;

class zbpy extends zbz {
   private boolean a = true;
   private int d = 0;

   zbpy(String var1) {
      this.c(519);
      this.c = zakq.a(var1);
      this.d = var1.length();
      if (this.c != null) {
         this.a = this.c.length == var1.length();
      }

   }

   void a(zqa var1) throws Exception {
      if (this.c == null) {
         this.c = new byte[7];
         this.c[0] = 7;
         this.c[1] = 2;
         this.c[2] = 3;
         var1.a(this.c);
      } else {
         int var2 = 3 + this.c.length;
         byte[] var3 = new byte[7];
         var3[0] = 7;
         var3[1] = 2;
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.d), 0, var3, 4, 2);
         if (!this.a) {
            var3[6] = 1;
         }

         if (var2 < 8224) {
            System.arraycopy(com.aspose.cells.b.a.zc.a(3 + this.c.length), 0, var3, 2, 2);
            var1.a(var3);
            var1.a(this.c);
         } else {
            int var4 = this.a ? 8221 : 8220;
            System.arraycopy(com.aspose.cells.b.a.zc.a(3 + var4), 0, var3, 2, 2);
            var1.a(var3);
            var1.a(this.c, 0, var4);
            int var5 = var4;
            var4 = this.a ? 8223 : 8222;
            var3 = new byte[5];
            var3[0] = 60;
            if (!this.a) {
               var3[4] = 1;
            }

            while(var5 < this.c.length) {
               if (var4 > this.c.length - var5) {
                  var4 = this.c.length - var5;
               }

               System.arraycopy(com.aspose.cells.b.a.zc.a(1 + var4), 0, var3, 2, 2);
               var1.a(var3);
               var1.a(this.c, var5, var4);
               var5 += var4;
            }
         }

      }
   }
}
